package com.jh.user.repository;

import com.jh.user.pojo.Area;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author zhugu
 * @version 1.0
 * 2018/12/6 9:33
 */
@Repository
public interface AreaRepository extends JpaRepository<Area, Long>, JpaSpecificationExecutor<Area> {
    @Query("select a from Area a where a.cityid = :cityId")
    List<Area> getByCityId(@Param("cityId") String cityId);
}
